from PyQt5.QtWidgets import * 
import sys

class Winform(QWidget):
    def __init__(self,parent=None):
        super(Winform,self).__init__(parent)
        self.setWindowTitle("xinhaohelloworld")
        self.resize(330,50)
        btn = QPushButton("close",self)
        btn.clicked.connect(self.close)

if __name__ == "__main__":
    app = QApplication(sys.argv)
    win = Winform()
    win.show()
    sys.exit(app.exec_())